Ext.define('iMedproplus.view.DevelContainer', {
    extend: 'Ext.container.Container',
    alias: 'widget.develcontainer',

    requires: [
    'iMedproplus.view.component.DictionaryComboBox'
    ],
    height: 250,
    width: 400,

    initComponent: function() {
        var me = this;

        Ext.applyIf(me, {
            items: [
            {
                xtype: 'button',
                text: 'Struktura',
                listeners: {
                    click: {
                        fn: me.onStructureButtonClick,
                        scope: me
                    }
                }
            },
            {
                xtype: 'button',
                text: 'Pacjenci',
                listeners: {
                    click: {
                        fn: me.onPatientButtonClick,
                        scope: me
                    }
                }
            },
            {
                xtype: 'button',
                text: 'Upload pliku',
                listeners: {
                    click: {
                        fn: me.onUploadButtonClick,
                        scope: me
                    }
                }
            },
            {
                xtype: 'button',
                text: 'Icd9',
                listeners: {
                    click: {
                        fn: me.onIcd9ButtonClick,
                        scope: me
                    }
                }
            },
            {
                xtype: 'button',
                text: 'U\u017cytkownicy',
                listeners: {
                    click: {
                        fn: me.onUserButtonClick,
                        scope: me
                    }
                }
            },
            {
                xtype: 'button',
                text: 'Personel',
                listeners: {
                    click: {
                        fn: me.onStaffButtonClick,
                        scope: me
                    }
                }
            },
            {
                xtype: 'dictionarycombobox',
                dictionaryId : 'testowy'
            }
            ]
        });
        me.callParent(arguments);
    },
    
    onStructureButtonClick: function(){
        this.fireEvent('strucutreButtonClick');
    },
    onPatientButtonClick: function(){
        this.fireEvent('patientButtonClick');
    },
    
    onUploadButtonClick: function(){
        this.fireEvent('uploadButtonClick');
    },
    
    onIcd9ButtonClick: function(){
        this.fireEvent('icd9ButtonClick');
    },
    
    onUserButtonClick: function(){
        this.fireEvent('userButtonClick');
    },
    
    onStaffButtonClick: function(){
        this.fireEvent('staffButtonClick');
    }
});